import day from 'dayjs';
import {getMonthStartDay} from 'lib/dayUtils';

export const getDaysList = (accountsDate: string) => {
  const monthEndNumber = day(accountsDate).endOf('month').date();
  const startNumber = getMonthStartDay(accountsDate);

  let daysList = [];
  for (let i = 1; i < startNumber + monthEndNumber; i++) {
    daysList.push(i < startNumber ? '' : i - startNumber + 1);
  }
  return daysList;
};
